package com.mt.restaurant.entity.material;

import javax.persistence.*;
import java.io.Serializable;
import java.util.List;

import com.mt.common.core.annotation.DColumn;
import com.mt.common.core.annotation.DEntity;
import com.mt.common.core.web.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;



import com.mt.restaurant.entity.material.SupplyMaterial;

@DEntity(label="材料订单",comment="",moduleLabel="原材料管理")
@Entity(name="restaurant_material_order")
@Table(name = "restaurant_material_order" , indexes = { @Index(name = "index_supply_material_id", columnList = "supply_material_id")  })
@ApiModel(description = "材料订单:")
public class MaterialOrder extends BaseEntity implements Serializable{
	private static final long serialVersionUID = 1L;

	@DColumn(index=3,label="供应原材料id",foreignEntity="SupplyMaterial",comment="供应原材料",component="对象选择",where=false)
	@ApiModelProperty(value = "供应原材料id:供应原材料")
	@Column(name="supply_material_id",length=255,nullable=true,unique=false)
	private Long supplyMaterialId;

	@Transient
	private List<OrderMaterialRelation> orderMaterialRelationList;

	@Transient
	private List<SupplyMaterial> supplyMaterialList;

	@Transient
	@ApiModelProperty(value = "供应原材料id名称:供应原材料")
	@DColumn(index=3,label="供应原材料id",foreignEntity="SupplyMaterial",comment="供应原材料")
	private String supplyMaterialName;

	@DColumn(index=4,label="供货数量",comment="",component="数字，小数",where=false)
	@ApiModelProperty(value = "供货数量:")
	@Column(name="supply_num",length=255,nullable=false,unique=false)
	private Double supplyNum;

	@DColumn(index=5,label="是否合格",comment="",component="开关",where=false)
	@ApiModelProperty(value = "是否合格:")
	@Column(name="qualified",length=255,nullable=true,unique=false)
	private Boolean qualified;

	@DColumn(index=6,label="价格",comment="购买材料的实际价格",component="数字，小数",where=false)
	@ApiModelProperty(value = "价格:购买材料的实际价格")
	@Column(name="price",length=255,nullable=false,unique=false)
	private Double price;

	@DColumn(index=7,label="订单状态",comment="订单状态",component="文本",where=false)
	@ApiModelProperty(value = "订单状态:订单状态")
	@Column(name="status",length=255,nullable=true,unique=false)
	private String status;

	@DColumn(index=8,label="仓库id",comment="",component="数字，整数",where=false)
	@ApiModelProperty(value = "仓库id:")
	@Column(name="store_id",length=255,nullable=true,unique=false)
	private Long storeId;

	public MaterialOrder() {
	}

//	@DColumn(index=9,label="操作",comment="提交审核/通过审核/打回",component="数字，整数",where=false)
//	@ApiModelProperty(value = "操作：")
//	@Column(name="operation",length=255,nullable=false,unique=false)
//	private String operation;


	public Long getSupplyMaterialId() {
		return this.supplyMaterialId;
	}

	public void setSupplyMaterialId(Long supplyMaterialId) {
		this.supplyMaterialId = supplyMaterialId;
	}

	public Double getSupplyNum() {
		return this.supplyNum;
	}

	public void setSupplyNum(Double supplyNum) {
		this.supplyNum = supplyNum;
	}

	public Boolean getQualified() {
		return this.qualified;
	}

	public void setQualified(Boolean qualified) {
		this.qualified = qualified;
	}

	public Double getPrice() {
		return this.price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Long getStoreId() {
		return this.storeId;
	}

	public void setStoreId(Long storeId) {
		this.storeId = storeId;
	}

	public List<SupplyMaterial> getSupplyMaterialList() {
		return supplyMaterialList;
	}

	public void setSupplyMaterialList(List<SupplyMaterial> supplyMaterialList) {
		this.supplyMaterialList = supplyMaterialList;
	}

	public String getSupplyMaterialName() {
		return this.supplyMaterialName;
	}

	public void setSupplyMaterialName(String supplyMaterialName) {
		this.supplyMaterialName = supplyMaterialName;
	}

	public List<OrderMaterialRelation> getOrderMaterialRelationList() {
		return orderMaterialRelationList;
	}

	public void setOrderMaterialRelationList(List<OrderMaterialRelation> orderMaterialRelationList) {
		this.orderMaterialRelationList = orderMaterialRelationList;
	}

}
